﻿using System.Collections.Generic;

namespace ChessGameEngine
{
    public class Bishop : Piece
    {
        public Bishop(ChessEngine chessEngine, object uiElement, PieceColor color)
            : base(chessEngine, uiElement, color)
        {
        }

        public override IEnumerable<TilePosition> GetAllPossibleMoves()
        {
            // visit all tiles north and south east
            foreach (TilePosition legalMove in VisitNorthSouthEast(ChessEngine.MaxTiles))
                yield return legalMove;

            // visit all tiles north and south west
            foreach (TilePosition legalMove in VisitNorthSouthWest(ChessEngine.MaxTiles))
                yield return legalMove;
        }

    }
}
